package phapp.model.barapp;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import javacommon.base.BaseEntity;


/**
 * <p> 标题: 酒吧在线会员状态表, tc_bar_online_info 数据类 POJO
 * <p>Description: DAO层映射到数据类,页面封装数据映射到数据类
 * <p>Copyright: Copyright (c) 2014-10
 * <p>Company: 
 * @author you name
 * @version 1.0
*/

public class BarOnline extends BaseEntity {
   
   //date formats
   public static final String FORMAT_CREATE_TIME = DATE_TIME_FORMAT;
   
   //columns START
   /**序列*/
   private java.lang.Integer id;
   /**吧台ID*/
   private java.lang.Integer deskId;
   /**会员ID*/
   private java.lang.Integer menberId;
   /**上线时间*/
   private java.sql.Timestamp createTime;
   /**酒吧ID*/
   private java.lang.Integer barId;
   /**点赞数:在线才有效*/
   private java.lang.Integer likes;
   /**会员名*/
   private java.lang.String menberName; 
   /**酒吧名*/
   private java.lang.String barName;
   /**会员主类属性*/ 
   private VipMain vipMain;
   /**台桌名*/
   private java.lang.String deskName;
   
   /** 1:查好友,2:取非好友*/
   private  java.lang.String control;//
   
   private java.util.ArrayList idList;
   //columns END

	public BarOnline(){
	}

	public BarOnline(
		java.lang.Integer id
	){
		this.id = id;
	}

   public VipMain getVipMain() {
		return vipMain;
	}

	public void setVipMain(VipMain vipMain) {
		this.vipMain = vipMain;
	}
	
	public java.lang.String getControl() {
		return control;
	}

	public void setControl(java.lang.String control) {
		this.control = control;
	}

	public void setId(java.lang.Integer value) {
      this.id = value;
   }
   
   public java.lang.String getMenberName() {
		return menberName;
	}

	public void setMenberName(java.lang.String menberName) {
		this.menberName = menberName;
	}

	public java.lang.String getBarName() {
		return barName;
	}

	public java.lang.String getDeskName() {
		return deskName;
	}

	public void setDeskName(java.lang.String deskName) {
		this.deskName = deskName;
	}

	public void setBarName(java.lang.String barName) {
		this.barName = barName;
	}

	public java.lang.Integer getLikes() {
	   if(null==this.likes||this.likes.toString().length()==0)
		   return 0;
	   else
		   return this.likes;
   }

   public void setLikes(java.lang.Integer likes) {
	this.likes = likes;
   }

   public java.lang.Integer getId() {
	   if(null==this.id||this.id.toString().length()==0)
		   return 0;
	   else
		   return this.id;  
   }
   public void setDeskId(java.lang.Integer value) {
      this.deskId = value;
   }
   
   public java.lang.Integer getDeskId() {
	   if(null==this.deskId||this.deskId.toString().length()==0)
		   return 0;
	   else
		   return this.deskId;  
   }
   public void setMenberId(java.lang.Integer value) {
      this.menberId = value;
   }
   
   public java.lang.Integer getMenberId() {
	   if(null==this.menberId||this.menberId.toString().length()==0)
		   return 0;
	   else
		   return this.menberId;  
   }
   public String getCreateTimeString() {
      return date2String(getCreateTime(), FORMAT_CREATE_TIME);
   }
   
   public void setCreateTimeString(String value) {
      setCreateTime(string2Date(value, FORMAT_CREATE_TIME,java.sql.Timestamp.class));
   }
   
   public void setCreateTime(java.sql.Timestamp value) {
      this.createTime = value;
   }
   
   public java.sql.Timestamp getCreateTime() {
      return this.createTime;
   }
   public void setBarId(java.lang.Integer value) {
      this.barId = value;
   }
   
   public java.lang.Integer getBarId() {
	   if(null==this.barId||this.barId.toString().length()==0)
		   return 0;
	   else
		   return this.barId; 
   }

   public java.util.ArrayList getIdList() {
      return idList;
   }

   public void setIdList(java.util.ArrayList idList) {
      this.idList = idList;
   }

    /**手动增加属性后,toString,hashCode,equals都要修改*/
   public String toString() {
      return new ToStringBuilder(this)
         .append("Id",getId())
         .append("DeskId",getDeskId())
         .append("MenberId",getMenberId())
         .append("CreateTime",getCreateTime())
         .append("BarId",getBarId())
         .append("Likes",getLikes())
         .toString();
   }
   
   public int hashCode() {
      return new HashCodeBuilder()
         .append(getId())
         .append(getDeskId())
         .append(getMenberId())
         .append(getCreateTime())
         .append(getBarId())
         .append(getLikes())
         .toHashCode();
   }
   
   public boolean equals(Object obj) {
      if(obj instanceof BarOnline == false) return false;
      if(this == obj) return true;
      BarOnline other = (BarOnline)obj;
      return new EqualsBuilder()
         .append(getId(),other.getId())
         .append(getDeskId(),other.getDeskId())
         .append(getMenberId(),other.getMenberId())
         .append(getCreateTime(),other.getCreateTime())
         .append(getBarId(),other.getBarId())
         .append(getLikes(),other.getLikes())
         .isEquals();
   }
}

